//
//  userInfoTitleView.m
//  NiubilityProject
//
//  Created by Apple on 2017/11/24.
//  Copyright © 2017年 Apple. All rights reserved.
//

#import "userInfoTitleView.h"

@implementation userInfoTitleView

- (instancetype)init{
    if (self = [super init]) {
        JS_WeakSelf(self)
        _titleL = [YYLabel new];
        _titleL.font = UIFontMake(14);
        _titleL.textColor = JS_colorWithHex(kColorBlack3);
        _contenL = [YYLabel new];
        _contenL.font = _titleL.font;
        _contenL.textColor = TabBarTintColor;
        [self js_addSubviews:@[_titleL,_contenL]];
        [_titleL setContentHuggingPriority:UILayoutPriorityDefaultLow forAxis:UILayoutConstraintAxisHorizontal];
        [_contenL setContentHuggingPriority:UILayoutPriorityDefaultLow forAxis:UILayoutConstraintAxisHorizontal];
        [_titleL mas_makeConstraints:^(MASConstraintMaker *make) {
            make.top.and.bottom.equalTo(weakself);
            make.left.equalTo(weakself).offset(kRealValue(10));
        }];
        [_contenL mas_makeConstraints:^(MASConstraintMaker *make) {
            make.top.and.bottom.equalTo(weakself);
            make.left.equalTo(weakself.titleL.mas_right).offset(10);
        }];
        [self mas_makeConstraints:^(MASConstraintMaker *make) {
            make.right.equalTo(weakself.contenL.mas_right).offset(10);
            make.height.mas_equalTo(30);
        }];
        self.line = [UIView new];
        [self addSubview:self.line];
        self.line.backgroundColor =JS_colorWithHex(kBodyLineColor);
        [self.line  mas_makeConstraints:^(MASConstraintMaker *make) {
            make.left.equalTo(self);
            make.centerY.equalTo(_titleL);
            make.height.mas_equalTo(kRealValue(10));
            make.width.mas_equalTo(1);
        }];
        
    }
    return self;
}
- (void)layoutSubviews{
    [super layoutSubviews];
//    JS_WeakSelf(self)
}
@end
